package part1;

public class Main {
    public static void main(String[] args) {
        // 创建ObjectStructure
        ObjectStructure objectStructure = new ObjectStructure();

        // 这里还可以给名字
        objectStructure.attach(new Man());
        objectStructure.attach(new Man());
        objectStructure.attach(new Man());

        Success success = new Success();
        objectStructure.display(success);

        objectStructure.attach(new Woman());
        Fail fail = new Fail(); // 甚至还可以给更多的状态
        objectStructure.display(fail);
    }
}
